package mobi.greenplate.client.domain;

import java.io.Serializable;

public class Friend implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String userName;
    private User owner;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public User getOwner() {
        return owner;
    }

    public void setOwner(User owner) {
        this.owner = owner;
    }   

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Friend other = (Friend) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.userName == null) ? (other.userName != null) : !this.userName.equals(other.userName)) {
            return false;
        }
        if (this.owner != other.owner && (this.owner == null || !this.owner.equals(other.owner))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 13 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 13 * hash + (this.userName != null ? this.userName.hashCode() : 0);
        hash = 13 * hash + (this.owner != null ? this.owner.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "Friend{" + "id=" + id + "userName=" + userName + "owner=" + owner + '}';
    }

    
}
